
<div id="about_main">
	<div id="about_toppic"><img src="/images/home_page/images/abouttop2.jpg" width="960" height="90" /></div>
<div id="sub_nav">您的位置 ： <a href="/psysource/home_page/index">首页</a> > <a href="/psysource/home_page/about_company">关于心嘉源</a> > 新闻管理</div>

<div id="right_menu">
	<div id=left_menu>
<DL id="gallery">
<dt><a href="/content/news_manage">新闻中心</a>
<dt><a href="/content/research_manage">研究中心</a>
<dt><a href="/content/download_manage">资源下载</a>
<DD><A title="添加资源" 
href="/content/add_download">添加资源</A> 
<dt><a href="/content/faquestion_manage">常见问题管理</a>
</DD>
</DL>
</div>
	<div id="company_text" style="margin-left:25px;">
	<div><p style="color: red"><%= flash[:notice] %></p></div>
	<p style="line-height:19px;">资源列表：<br/></p>
   <% if @downloads%>
   <% for download in @downloads %>
     <p>&nbsp;&nbsp;<%=download.title %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="#" onclick="Element.show('u_load<%=download.id%>');">添加资源</a>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <a onclick="return confirm('确定删除?');" href="/content/destroy_download/<%=download.id%>">删除</a>
      </p>
     <div id="u_load<%=download.id%>" style="display:none; background-color:#AAB1BA;width:540px">
           <% form_for(:file, :url => {:action=>'create_file'}, :html => { :id=>"file_from"+download.id.to_s ,:multipart => true }) do |f| -%> <p> 
                 <span><font color="red">支持 word  pdf  rar zip  上传</font></span><br/>
                  资源名：
                  <input type="text" size="8" name="name"></input>
                     <input type="hidden" name="d_id" value="<%=download.id%>" ></input>
             <%= f.file_field :uploaded_data %>
                    <input type="submit"  value="上传" onclick="Element.hide('u_load<%download.id%>');"> 
              <% end -%>
              
     </div>
     <% files = download.downfiles %>
      <% if files.size >0 %>
      <p>
       <div style="margin-left:35px;line-height:19px;">
            所属资源文件:<% for file in files %>
             <%=file.name-%> &nbsp;
             <a onclick="return confirm('确定要删除?');" href="/content/destroy_file/<%=file.id%>"><font color="red">X</font></a>
             &nbsp;&nbsp;&nbsp;&nbsp;
            <% end %>
      </div>
         </p> <br/>
        <% end %>
      <%  end %>
     <% else %>
     暂时没有资源！
     <% end %>
    
</p>
	
	</div>
</div>
</div>
